<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
</head>
<body>
<span th:fragment="main">
    <div class="attribute-tab w-100 mdc-data-table table-responsive noborder" id="attribute-tab-0">

        <div class="jqueryui-tabs">
              <ul>
                <li><a id="applications" href="#applications-tab">Applications</a></li>
                <li><a id="saml2metadataproviders" href="#saml2metadataproviders-tab" class="hide">SAML2 Metadata Sources</a></li>
              </ul>

            <div id="applications-tab">

                <table id="applicationsTable" class="mdc-data-table__table table table-striped noborder">
                    <thead>
                    <tr class="mdc-data-table__header-row">
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col"></th>
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col">Service</th>
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col">URL</th>
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col">Description</th>
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col"></th>
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col"></th>
                    </tr>
                    </thead>
                    <tbody class="mdc-data-table__content">
                    </tbody>
                </table>

                <div width="10%">
                    <div class="mdc-touch-target-wrapper">
                        <span class="mdc-menu-surface--anchor">
                            <button name="newService" id="newService"
                                    onclick="cas.openMenu();"
                                    class="mdc-button mdc-button--raised" aria-label="Create">
                                <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-plus"
                                                                   aria-hidden="true"></i>New</span>
                            </button>
                            <div class="mdc-menu mdc-menu-surface" style="min-width: max(500px, 50%);)">
                                <ul class="mdc-list" aria-orientation="vertical" role="menu" aria-hidden="true"
                                    tabindex="-1">
                                    <li class="mdc-list-item pb-3" role="menuitem">
                                        <span class="mdc-list-item__ripple"></span>
                                        <i class="mdi mdi-pencil fas fa-pencil" style="margin-top: 2px;"
                                           aria-hidden="true"></i>
                                        <div class="text-justify">
                                            <h3>Editor</h3>
                                            <span>Create a service definition using a plain-text editor where you can directly
                                                modify the service definition or copy-paste it into the editor from elsewhere.</span>
                                            <p></p>
                                            <button name="newServicePlain" id="newServicePlain"
                                                    class="mdc-button mdc-button--raised"
                                                    aria-label="Create">
                                                <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-plus"
                                                                                   aria-hidden="true"></i>Proceed</span>
                                            </button>
                                        </div>
                                    </li>

                                    <li class="mdc-list-item pb-3" role="menuitem" style="margin-top: 10px;">
                                        <span class="mdc-list-item__ripple"></span>
                                        <i class="mdi mdi-wizard-hat" aria-hidden="true"></i>
                                        <div class="text-justify">
                                            <h3 style="margin-top: 2px;">Wizard</h3>
                                            <span>Create a service definition using a step-by-step wizard and form editor, allowing
                                                you to modify individual settings and policies without prior knowledge of
                                                the internal service definition model.</span>
                                            <p></p>
                                            <button name="newServiceWizard" id="newServiceWizard"
                                                    class="mdc-button mdc-button--raised"
                                                    style="margin-bottom: 2px;"
                                                    aria-label="Create">
                                                <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-plus"
                                                                                   aria-hidden="true"></i>Proceed</span>
                                            </button>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </span>
                        <input type="file" id="serviceFileInput" style="display: none;">
                        <button name="importService" id="importService" class="mdc-button mdc-button--raised"
                                aria-label="Import">
                             <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-file-import"
                                                                aria-hidden="true"></i>Import</span>
                        </button>
                        <button name="exportAll" id="exportAll" class="mdc-button mdc-button--raised"
                                aria-label="Export All">
                             <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-file-export"
                                                                aria-hidden="true"></i>Export</span>
                        </button>
                        <button name="reloadAll" id="reloadAll" class="mdc-button mdc-button--raised"
                                aria-label="Reload"
                                onclick="fetchServices();">
                             <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-refresh"
                                                                aria-hidden="true"></i>Reload</span>
                        </button>
                    </div>
                </div>
                <div class="mw-20">
                  <canvas id="servicesChart"></canvas>
                </div>

                <div class="mdc-dialog modal" id="editServiceWizardDialog" role="alertdialog"
                     aria-modal="true" aria-labelledby="edit-service-dialog-title" aria-describedby="dialog-content">
                    <div class="mdc-dialog__container w-100 modal-dialog" style="max-height: 85%">
                        <div class="mdc-dialog__surface mw-100 w-75 modal-content min-height-60">
                            <div class="mdc-dialog__content modal-body" id="edit-service-wizard-dialog-content">

                                <div class="p-4 banner banner-warning"><h4>
                                    The wizard-based service editor is a work in progress and not all features are supported yet.
                                    Tread lightly and consider using the plain-text editor for production use cases.
                                    Verify with release notes for updates on the wizard functionality and feel free to contribute!
                                </h4></div>
                                <p>The following application type is chosen:</p>
                                <pre><code id="serviceClassType" class="border-rounded language-html"></code></pre>

                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='hideAdvancedOptions',
                                    label='#Hide Advanced Options', cssClass='pb-2', selected=true, dataAttrs='changeEventHandler=hideAdvancedRegisteredServiceOptions')}"/>
                                
                                <form id="editServiceWizardForm">
                                    <div id="editServiceWizardMenu" class="jqueryui-accordion">
                                          <h3>General</h3>
                                          <div id="editServiceWizardMenuItemGeneral">
                                              <p>This section defines basic properties and settings that can be assigned to an application.</p>

                                              <div id="editServiceWizardGeneralContainer"
                                                   class="mdc-input-group-field mdc-input-group-field-append w-100">
                                                <script type="text/javascript">
                                                    createInputField({
                                                        labelTitle: "Name",
                                                        name: "registeredServiceName",
                                                        paramName: "name",
                                                        required: true,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Define a logical name for this application, preferably without spaces or special characters."
                                                    })
                                                        .on("input", generateServiceDefinition);

                                                    createInputField({
                                                        labelTitle: "Service ID",
                                                        name: "registeredServiceId",
                                                        paramName: "serviceId",
                                                        required: true,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Define a pattern that determines which requests are mapped to this application. This is typically a URL pattern or a regular regular expression."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        labelTitle: "Description",
                                                        name: "registeredServiceDescription",
                                                        paramName: "description",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Provide a brief description of the application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Numeric ID",
                                                        name: "registeredServiceIdentifier",
                                                        paramName: "id",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Define a unique numeric identifier for this application. Depending on your choice of registry, this ID may be auto-generated."
                                                    }).on("input", generateServiceDefinition)
                                                        .attr("type", "number");

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Theme",
                                                        name: "registeredServiceTheme",
                                                        paramName: "theme",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Specify a theme to customize the appearance of the login and other user interface pages for this application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Locale",
                                                        name: "registeredServiceLocale",
                                                        paramName: "locale",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Specify a locale to customize the language and regional settings for this application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Information URL",
                                                        name: "registeredServiceInformationUrl",
                                                        paramName: "informationUrl",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Provide a URL that points to more information about this application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Privacy URL",
                                                        name: "registeredServicePrivacyUrl",
                                                        paramName: "privacyUrl",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Provide a URL that points to the privacy policy for this application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Template",
                                                        name: "registeredServiceTemplate",
                                                        paramName: "templateName",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Specify a template name to apply predefined settings and configurations for this application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Evaluation Order",
                                                        name: "registeredServiceEvaluationOrder",
                                                        paramName: "evaluationOrder",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Define the order in which this application is evaluated relative to other applications. Lower numbers indicate higher priority."
                                                    }).on("input", generateServiceDefinition)
                                                        .attr("type", "number");

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Logo",
                                                        name: "registeredServiceEvaluationLogo",
                                                        paramName: "logo",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Provide a URL to a logo image that represents this application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Logout URL",
                                                        name: "registeredServiceEvaluationLogoutUrl",
                                                        paramName: "logoutUrl",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Specify a URL to redirect users to upon logout from this application."
                                                    }).on("input", generateServiceDefinition);

                                                    createInputField({
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Environment(s)",
                                                        name: "registeredServiceEnvironments",
                                                        paramName: "environments",
                                                        required: false,
                                                        containerId: "editServiceWizardGeneralContainer",
                                                        title: "Define the environment(s), separated by comma, in which this application operates (e.g., development, staging, production)"
                                                    }).on("input", generateServiceDefinition)
                                                        .data("renderer", function (value) {
                                                            return ["java.util.HashSet", value.split(",")];
                                                        });

                                                </script>

                                                <section class="class-CasRegisteredService">
                                                       <script type="text/javascript">
                                                           createInputField({
                                                               cssClasses: "advanced-option",
                                                               labelTitle: "Redirect URL",
                                                               name: "registeredServiceRedirectUrl",
                                                               paramName: "redirectUrl",
                                                               required: false,
                                                               containerId: "editServiceWizardGeneralContainer",
                                                               title: "Define the URL to which users are redirected after successful authentication for this application."
                                                           }).on("input", generateServiceDefinition);
                                                           createInputField({
                                                               cssClasses: "advanced-option",
                                                               labelTitle: "Supported Protocol(s)",
                                                               name: "registeredServiceSupportedProtocols",
                                                               paramName: "supportedProtocols",
                                                               required: false,
                                                               containerId: "editServiceWizardGeneralContainer",
                                                               title: "Define the supported protocol(s) for this application, separated by comma (e.g., <code>CAS10,CAS20,CAS30,SAML1</code>)."
                                                           }).on("input", generateServiceDefinition)
                                                               .data("renderer", function (value) {
                                                                   return ["java.util.HashSet", value.split(",")];
                                                               });

                                                       </script>
                                                </section>
                                                  
                                                <div>
                                                    <script type="text/javascript">
                                                        createSelectField({
                                                            cssClasses: "advanced-option",
                                                            containerId: "editServiceWizardGeneralContainer",
                                                            labelTitle: "Logout Type:",
                                                            paramName: "logoutType",
                                                            options: [
                                                                {value: "", text: "DEFAULT", selected: true},
                                                                {value: "BACK_CHANNEL", text: "BACK_CHANNEL"},
                                                                {value: "FRONT_CHANNEL", text: "FRONT_CHANNEL"},
                                                                {value: "NONE", text: "NONE"}
                                                            ],
                                                            helpText: "Specify the logout type for this application. <code>BACK_CHANNEL</code> indicates server-to-server logout, " +
                                                                "<code>FRONT_CHANNEL</code> indicates browser-based logout, and <code>NONE</code> indicates no logout handling."
                                                        });
                                                    </script>
                                                    
                                                    <section class="class-CasRegisteredService">
                                                        <script type="text/javascript">
                                                             createSelectField({
                                                                 cssClasses: "advanced-option",
                                                                 containerId: "editServiceWizardGeneralContainer",
                                                                 labelTitle: "Response Type:",
                                                                 paramName: "responseType",
                                                                 options: [
                                                                     {value: "", text: "DEFAULT", selected: true},
                                                                     {value: "POST", text: "POST"},
                                                                     {value: "REDIRECT", text: "REDIRECT"},
                                                                     {value: "HEADER", text: "HEADER"}
                                                                 ],
                                                                 helpText: "Specify the response type for this application. <code>POST</code> indicates form post, " +
                                                                     "<code>REDIRECT</code> indicates HTTP redirect, and <code>HEADER</code> indicates HTTP header-based response."
                                                             });
                                                        </script>
                                                    </section>
                                                </div>
                                              </div>
                                          </div>

                                         <h3 class="class-OAuthRegisteredService class-OidcRegisteredService">OAuth / OpenID Connect Relying Party</h3>
                                         <div class="class-OAuthRegisteredService class-OidcRegisteredService"
                                              id="editServiceWizardMenuItemOAuthOidc">
                                             <p>This section defines properties and settings applicable to OAuth or OpenID Connect relying parties. </p>
                                             <div id="editServiceWizardOAuthOidcContainer"
                                                  class="mdc-input-group-field mdc-input-group-field-append w-100">
                                                 <script type="text/javascript">
                                                      createInputField({
                                                          labelTitle: "Client ID",
                                                          name: "registeredServiceClientId",
                                                          paramName: "clientId",
                                                          required: true,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the client identifier for this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          labelTitle: "Client Secret",
                                                          name: "registeredServiceClientSecret",
                                                          paramName: "clientSecret",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the client secret for this OAuth/OpenID Connect relying party."
                                                      }).attr("type", "password")
                                                          .on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Client Secret Expiration",
                                                          name: "registeredServiceClientSecretExpiration",
                                                          paramName: "clientSecretExpiration",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          serviceClass: "class-OidcRegisteredService",
                                                          title: "Time, measured in UTC epoch, at which the client secret will expire or 0 if it will not expire."
                                                      }).attr("type", "number")
                                                          .on("input", generateServiceDefinition);

                                                      createInputField({
                                                          labelTitle: "Scope(s)",
                                                          name: "registeredServiceScopes",
                                                          paramName: "scopes",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the scope(s) for this OAuth/OpenID Connect relying party, separated by comma (e.g., <code>openid,profile,email</code>)."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.HashSet", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Supported Grant Type(s)",
                                                          name: "registeredServiceSupportedGrantTypes",
                                                          paramName: "supportedGrantTypes",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the supported grant type(s) for this OAuth/OpenID Connect relying party, separated by comma (e.g., <code>authorization_code,refresh_token,client_credentials</code>)."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.HashSet", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Supported Response Type(s)",
                                                          name: "registeredServiceSupportedResponseTypes",
                                                          paramName: "supportedResponseTypes",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the supported response type(s) for this OAuth/OpenID Connect relying party, separated by comma (e.g., <code>code,id_token,token</code>)."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.HashSet", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Audience(s)",
                                                          name: "registeredServiceAudience",
                                                          paramName: "audience",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the audience(s) for this OAuth/OpenID Connect relying party, separated by comma."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.HashSet", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "JWKS",
                                                          name: "registeredServiceJwksUrl",
                                                          paramName: "jwks",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the JSON Web Key Set (JWKS) URL for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "JWKS Key ID",
                                                          name: "registeredServiceJwksUrl",
                                                          paramName: "jwksKeyId",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the JSON Web Key Set (JWKS) Key ID in the keystore for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "JWKS Cache Duration",
                                                          name: "registeredServiceCacheDuration",
                                                          paramName: "jwksCacheDuration",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the cache duration <code>PT5S</code> for the JSON Web Key Set (JWKS) for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "ID Token Issuer",
                                                          name: "registeredServiceIdTokenIssuer",
                                                          paramName: "idTokenIssuer",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the ID token issuer for this OpenID Connect relying party. Override the <code>iss</code> claim in the ID Token, which should only be used in special circumstances. Do NOT use this setting carelessly as the ID token’s issuer MUST ALWAYS match the identity provider’s issuer."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "ID Token Encryption Algorithm",
                                                          name: "registeredServiceIdTokenEncryptionAlg",
                                                          paramName: "idTokenEncryptionAlg",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the ID token encryption algorithm for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "ID Token Encryption Encoding",
                                                          name: "registeredServiceIdTokenEncryptionEncoding",
                                                          paramName: "idTokenEncryptionEncoding",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the ID token encryption encoding for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "ID Token Signing Algorithm",
                                                          name: "registeredServiceIdTokenSigningAlg",
                                                          paramName: "idTokenSigningAlg",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the ID token signing algorithm for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "User Info Signing Algorithm",
                                                          name: "registeredServiceUserInfoSigningAlg",
                                                          paramName: "userInfoSigningAlg",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the user info signing algorithm for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "User Info Encryption Response Algorithm",
                                                          name: "registeredServiceUserInfoEncryptionResponseAlg",
                                                          paramName: "userInfoEncryptedResponseAlg",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the user info encryption response algorithm for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "User Info Encryption Response Encoding",
                                                          name: "registeredServiceUserInfoEncryptionResponseEncoding",
                                                          paramName: "userInfoEncryptedResponseEncoding",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the user info encryption response encoding for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "JWT Access Token Signing Algorithm",
                                                          name: "registeredServiceJwtAccessTokenSigningAlg",
                                                          paramName: "jwtAccessTokenSigningAlg",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the JWT signing algorithm for access tokens issued to this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Introspection Response Signing Algorithm",
                                                          name: "registeredServiceIntrospectionSignedResponseAlg",
                                                          paramName: "introspectionSignedResponseAlg",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the signing algorithm for introspection responses issued to this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Introspection Response Encryption Algorithm",
                                                          name: "registeredServiceIntrospectionEncryptedResponseAlg",
                                                          paramName: "introspectionEncryptedResponseAlg",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the encryption algorithm for introspection responses issued to this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Introspection Response Encryption Encoding",
                                                          name: "registeredServiceIntrospectionEncryptedResponseEncoding",
                                                          paramName: "introspectionEncryptedResponseEncoding",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the encryption encoding for introspection responses issued to this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Token Endpoint Authentication Method",
                                                          name: "registeredServiceTokenEndpointAuthenticationMethod",
                                                          paramName: "tokenEndpointAuthenticationMethod",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the token endpoint authentication method for this OAuth/OpenID Connect relying party. Examples include <code>client_secret_basic,client_secret_jwt,etc</code>"
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "TLS Client Authentication Subject DN",
                                                          name: "registeredServiceTlsClientAuthSubjectDn",
                                                          paramName: "tlsClientAuthSubjectDn",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the TLS client authentication subject DN for this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "TLS Client Authentication SAN DNS",
                                                          name: "registeredServiceTlsClientAuthSanDns",
                                                          paramName: "tlsClientAuthSubjectDn",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the TLS client authentication SAN DNS for this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "TLS Client Authentication SAN URI",
                                                          name: "registeredServiceTlsClientAuthSanUri",
                                                          paramName: "tlsClientAuthSanUri",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the TLS client authentication SAN URI for this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "TLS Client Authentication SAN IP",
                                                          name: "registeredServiceTlsClientAuthSanIP",
                                                          paramName: "tlsClientAuthSanIp",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the TLS client authentication SAN IP for this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "TLS Client Authentication SAN Email",
                                                          name: "registeredServiceTlsClientAuthSanEmail",
                                                          paramName: "tlsClientAuthSanEmail",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the TLS client authentication SAN email for this OAuth/OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Application Type",
                                                          name: "registeredServiceApplicationType",
                                                          paramName: "applicationType",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          serviceClass: "class-OidcRegisteredService",
                                                          title: "Define the application type for this OpenID Connect relying party (e.g., <code>web, native, user_agent</code>)."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Subject Type",
                                                          name: "registeredServiceSubjectType",
                                                          paramName: "subjectType",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          serviceClass: "class-OidcRegisteredService",
                                                          title: "Define the subject type for this OpenID Connect relying party (e.g., <code>public,pairwise</code>)."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Sector Identifier URI",
                                                          name: "registeredServiceSectorIdentifierUri",
                                                          paramName: "sectorIdentifierUri",
                                                          required: false,
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          serviceClass: "class-OidcRegisteredService",
                                                          title: "Define the sector identifier URI for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);

                                                      createSelectField({
                                                          cssClasses: "advanced-option",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          labelTitle: "Backchannel Token Delivery Mode:",
                                                          paramName: "backchannelTokenDeliveryMode",
                                                          serviceClass: "class-OidcRegisteredService",
                                                          options: [
                                                              {value: "", text: "DEFAULT", selected: true},
                                                              {value: "ping", text: "PING"},
                                                              {value: "push", text: "PUSH"},
                                                              {value: "pull", text: "POLL"}
                                                          ],
                                                          helpText: "Specify the backchannel token delivery mode for this OpenID Connect relying party."
                                                      });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Backchannel Client Notification Endpoint",
                                                          name: "registeredServiceBackchannelClientNotificationEndpoint",
                                                          paramName: "backchannelClientNotificationEndpoint",
                                                          required: false,
                                                          serviceClass: "class-OidcRegisteredService",
                                                          containerId: "editServiceWizardOAuthOidcContainer",
                                                          title: "Define the backchannel client notification endpoint for this OpenID Connect relying party."
                                                      }).on("input", generateServiceDefinition);
                                                 </script>

                                                 <section>
                                                     <script type="text/javascript">
                                                         createSelectField({
                                                             cssClasses: "advanced-option",
                                                             containerId: "editServiceWizardOAuthOidcContainer",
                                                             labelTitle: "Response Mode:",
                                                             paramName: "responseMode",
                                                             options: [
                                                                 {value: "", text: "DEFAULT", selected: true},
                                                                 {value: "query", text: "QUERY"},
                                                                 {value: "query.jwt", text: "QUERY JWT"},
                                                                 {value: "fragment", text: "FRAGMENT"},
                                                                 {value: "fragment.jwt", text: "FRAGMENT JWT"},
                                                                 {value: "form_post", text: "FORM POST"},
                                                                 {value: "form_post.jwt", text: "FORM POST JWT"}
                                                             ],
                                                             helpText: "Specify the response mode for this OAuth/OpenID Connect relying party."
                                                         });
                                                     </script>
                                                 </section>

                                               <section class="pt-2">
                                                   <script type="text/javascript">
                                                       createSelectField({
                                                           containerId: "editServiceWizardOAuthOidcContainer",
                                                           labelTitle: "User Profile View Type:",
                                                           paramName: "userProfileViewType",
                                                           options: [
                                                               {value: "", text: "DEFAULT", selected: true},
                                                               {value: "NESTED", text: "NESTED"},
                                                               {value: "FLAT", text: "FLAT"}
                                                           ],
                                                           helpText: "Specify the user profile view type for this OAuth/OpenID Connect relying party."
                                                       });
                                                   </script>

                                                 </section>

                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='bypassApprovalPrompt', label='#Bypass Approval Prompt', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='generateRefreshToken', label='#Generate Refresh Token', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='renewRefreshToken', label='#Renew Refresh Token', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='jwtAccessToken', label='#JWT Access Token', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='jwtRefreshToken', label='#JWT Refresh Token', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='signIdToken', label='#Sign ID Tokens', cssClass='class-OidcRegisteredService pt-2', dataAttrs='param-skip-true=true', selected=true)}"/>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='encryptIdToken', label='#Encrypt ID Tokens', cssClass='class-OidcRegisteredService advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='idTokenEncryptionOptional', label='#Encrypt ID Tokens Optionally', cssClass='class-OidcRegisteredService pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='includeIdTokenClaims', label='#Include Claims in ID Tokens', selected=true, cssClass='class-OidcRegisteredService advanced-option', dataAttrs='param-skip-true=true')}"/>

                                             </div>
                                         </div>

                                        <h3 class="class-SamlRegisteredService">SAML2 Service Provider</h3>
                                        <div class="class-SamlRegisteredService"
                                             id="editServiceWizardMenuItemSaml">
                                             <p>This section defines properties and settings applicable to SAML2 service providers. </p>
                                             <div id="editServiceWizardSamlContainer"
                                                  class="mdc-input-group-field mdc-input-group-field-append w-100">
                                                 <script type="text/javascript">
                                                      createInputField({
                                                          labelTitle: "Metadata Location",
                                                          name: "registeredServiceMetadataLocation",
                                                          paramName: "metadataLocation",
                                                          required: true,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Define the metadata location (URL, file path, etc) for the SAML2 service provider."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Identity Provider Metadata Location",
                                                          name: "registeredServiceIdPMetadataLocation",
                                                          paramName: "idpMetadataLocation",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Directory location of SAML2 identity provider metadata available to CAS as an override."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Metadata Proxy Location",
                                                          name: "registeredServiceMetadataProxyLocation",
                                                          paramName: "metadataProxyLocation",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Proxy endpoint (i.e. <code>https://proxy-address:8901</code>) to fetch service metadata from URL resources."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Metadata Max Validity",
                                                          name: "registeredServiceMetadataMaxValidity",
                                                          paramName: "metadataMaxValidity",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a filter that requires the presence of a <code>ValidUntil</code> attribute on the root element of the metadata document."
                                                      }).on("input", generateServiceDefinition)
                                                          .attr("type", "number");

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Metadata Signature Location",
                                                          name: "registeredServiceMetadataSignatureLocation",
                                                          paramName: "metadataSignatureLocation",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Location of the metadata signing certificate/public key to validate the metadata which must be defined from system files or classpath. If defined, will enforce the <code>SignatureValidationFilter</code> validation filter on metadata."
                                                      }).on("input", generateServiceDefinition)
                                                          .attr("type", "number");

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Required Authentication Context Class",
                                                          name: "registeredServiceRequiredAuthenticationContextClass",
                                                          paramName: "requiredAuthenticationContextClass",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "If defined, will specify the SAML authentication context class in the final response."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Required NameID Format",
                                                          name: "registeredServiceRequiredNameIdFormat",
                                                          paramName: "requiredNameIdFormat",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "If defined, will force the indicated Name ID format in the final SAML response. "
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "NameID Qualifier",
                                                          name: "registeredServiceNameIdQualifier",
                                                          paramName: "nameIdQualifier",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the NameID qualifier to be used in SAML responses."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Service Provider NameID Qualifier",
                                                          name: "registeredServiceSPNameIdQualifier",
                                                          paramName: "serviceProviderNameIdQualifier",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the Service Provider NameID qualifier to be used in SAML responses."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Issuer Entity ID",
                                                          name: "registeredServiceIssuerEntityId",
                                                          paramName: "issuerEntityId",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "If defined, will override the issuer value with the given identity provider entity id. This may be useful in cases where CAS needs to maintain multiple identity provider entity ids."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Subject Locality",
                                                          name: "registeredServiceSubjectLocality",
                                                          paramName: "subjectLocality",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "If defined, will overwrite the <code>SubjectLocality</code> attribute of the SAML2 authentication statement."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Logout Response Binding",
                                                          name: "registeredServiceLogoutResponseBinding",
                                                          paramName: "logoutResponseBinding",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the logout response binding to use when sending SAML logout responses to the service provider."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Assertion Audience",
                                                          name: "registeredServiceAssertionAudience",
                                                          paramName: "assertionAudiences",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of audience values to include in SAML assertions."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Encryptable Attributes",
                                                          name: "registeredServiceEncryptableAttributes",
                                                          paramName: "encryptableAttributes",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of attribute names that should be encrypted in SAML assertions."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.HashSet", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Skew Allowance",
                                                          name: "registeredServiceSkewAllowance",
                                                          paramName: "skewAllowance",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "If defined, indicates number of seconds used to skew authentication dates such as valid-from and valid-until elements, etc."
                                                      }).on("input", generateServiceDefinition)
                                                          .attr("type", "number");

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signing Signature Reference Digest Methods",
                                                          name: "registeredServiceSigningSignatureReferenceDigestMethods",
                                                          paramName: "signingSignatureReferenceDigestMethods",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of digest methods to use when signing SAML messages."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signing Signature Algorithms",
                                                          name: "registeredServiceSigningSignatureAlgorithms",
                                                          paramName: "signingSignatureAlgorithms",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of signature algorithms to use when signing SAML messages."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signing Signature Blacklisted Algorithms",
                                                          name: "registeredServiceSigningSignatureBlackListedAlgorithms",
                                                          paramName: "signingSignatureBlackListedAlgorithms",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of blacklisted signature algorithms to avoid when signing SAML messages."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signing Signature Whitelisted Algorithms",
                                                          name: "registeredServiceSigningSignatureWhiteListedAlgorithms",
                                                          paramName: "signingSignatureBlackListedAlgorithms",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of whitelisted signature algorithms to avoid when signing SAML messages."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Whitelist/Blacklist Precedence",
                                                          name: "registeredServiceWhiteListBlackListPrecedence",
                                                          paramName: "whiteListBlackListPrecedence",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the precedence of whitelists/blacklists when selecting algorithms for signing/encryption. Accepted values are <code>INCLUDE</code> or <code>EXCLUDE</code>."
                                                      })
                                                          .css("text-transform", "uppercase")
                                                          .on("input", function () {
                                                              const value = $(this).val().toUpperCase();
                                                              $(this).val(value);
                                                          })
                                                          .on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Encryption Data Algorithms",
                                                          name: "registeredServiceEncryptionDataAlgorithms",
                                                          paramName: "encryptionDataAlgorithms",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of data encryption algorithms to use when encrypting SAML assertions."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Encryption Key Algorithms",
                                                          name: "registeredServiceEncryptionKeyAlgorithms",
                                                          paramName: "encryptionKeyAlgorithms",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of key encryption algorithms to use when encrypting SAML assertions."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Encryption Blacklisted Algorithms",
                                                          name: "registeredServiceEncryptionBlackListedAlgorithms",
                                                          paramName: "encryptionBlackListedAlgorithms",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of blacklisted algorithms to avoid when encrypting SAML assertions."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });
                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Encryption Whitelisted Algorithms",
                                                          name: "registeredServiceEncryptionWhiteListedAlgorithms",
                                                          paramName: "encryptionWhiteListedAlgorithms",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines a comma-separated list of whitelisted algorithms to avoid when encrypting SAML assertions."
                                                      }).on("input", generateServiceDefinition)
                                                          .data("renderer", function (value) {
                                                              return ["java.util.ArrayList", value.split(",")];
                                                          });


                                                      createSelectField({
                                                          containerId: "editServiceWizardSamlContainer",
                                                          labelTitle: "Sign Assertions:",
                                                          paramName: "signAssertions",
                                                          options: [
                                                              {value: "UNDEFINED", text: "UNDEFINED"},
                                                              {value: "TRUE", text: "TRUE"},
                                                              {value: "", text: "FALSE", selected: true}
                                                          ],
                                                          helpText: "Specify whether SAML assertions should be signed for this service provider."
                                                      });

                                                      createSelectField({
                                                          containerId: "editServiceWizardSamlContainer",
                                                          labelTitle: "Sign Responses:",
                                                          paramName: "signResponses",
                                                          options: [
                                                              {value: "UNDEFINED", text: "UNDEFINED"},
                                                              {value: "", text: "TRUE", selected: true},
                                                              {value: "FALSE", text: "FALSE"}
                                                          ],
                                                          helpText: "Specify whether SAML assertions should be signed for this service provider."
                                                      });

                                                      createSelectField({
                                                          cssClasses: "advanced-option",
                                                          containerId: "editServiceWizardSamlContainer",
                                                          labelTitle: "Sign Logout Responses:",
                                                          paramName: "signLogoutResponse",
                                                          options: [
                                                              {value: "", text: "UNDEFINED", selected: true},
                                                              {value: "TRUE", text: "TRUE"},
                                                              {value: "FALSE", text: "FALSE"}
                                                          ],
                                                          helpText: "Specify whether SAML assertions should be signed for this service provider."
                                                      });

                                                      createSelectField({
                                                          cssClasses: "advanced-option",
                                                          containerId: "editServiceWizardSamlContainer",
                                                          labelTitle: "Sign Logout Requests:",
                                                          paramName: "signLogoutRequest",
                                                          options: [
                                                              {value: "", text: "UNDEFINED", selected: true},
                                                              {value: "TRUE", text: "TRUE"},
                                                              {value: "FALSE", text: "FALSE"}
                                                          ],
                                                          helpText: "Specify whether SAML assertions should be signed for this service provider."
                                                      });

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Metadata Criteria Direction",
                                                          name: "registeredServiceMetadataCriteriaDirection",
                                                          paramName: "metadataCriteriaDirection",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the metadata criteria direction (e.g. INCLUDE or EXCLUDE)."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Metadata Criteria Pattern",
                                                          name: "registeredServiceMetadataCriteriaPattern",
                                                          paramName: "metadataCriteriaPattern",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the pattern used to filter metadata entities according to the criteria."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Metadata Expiration Duration",
                                                          name: "registeredServiceMetadataExpirationDuration",
                                                          paramName: "metadataExpirationDuration",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines how long metadata is considered valid (e.g., an ISO-8601 duration like PT60M)."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signing Credential Fingerprint",
                                                          name: "registeredServiceSigningCredentialFingerprint",
                                                          paramName: "signingCredentialFingerprint",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Specifies the fingerprint of the signing credential used for SAML signing operations."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signing Key Algorithm",
                                                          name: "registeredServiceSigningKeyAlgorithm",
                                                          paramName: "signingKeyAlgorithm",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the algorithm used for signing keys"
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Metadata Criteria Roles",
                                                          name: "registeredServiceMetadataCriteriaRoles",
                                                          paramName: "metadataCriteriaRoles",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines the metadata role(s) used when filtering entities (i.e. `SPSSODescriptor`, `IDPSSODescriptor`)."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signing Credential Type",
                                                          name: "registeredServiceSigningCredentialType",
                                                          paramName: "signingCredentialType",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Specifies the type of signing credential used (e.g., X509, BASIC)."
                                                      }).on("input", generateServiceDefinition);

                                                      createInputField({
                                                          cssClasses: "advanced-option",
                                                          labelTitle: "Signature Canonicalization Algorithm",
                                                          name: "registeredServiceSigningSignatureCanonicalizationAlgorithm",
                                                          paramName: "signingSignatureCanonicalizationAlgorithm",
                                                          required: false,
                                                          containerId: "editServiceWizardSamlContainer",
                                                          title: "Defines which canonicalization algorithm is used for XML signature processing."
                                                      }).on("input", generateServiceDefinition);

                                                 </script>

                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='logoutResponseEnabled', label='#Send Logout Response', cssClass='pt-2 advanced-option', selected=true, dataAttrs='param-skip-true=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='requireSignedRoot', label='#Require Metadata Root Signed', cssClass='pt-2 advanced-option', selected=true, dataAttrs='param-skip-true=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='metadataCriteriaRemoveEmptyEntitiesDescriptors', label='#Remove Empty Entities Descriptors', selected=true, cssClass='pt-2 advanced-option', dataAttrs='param-skip-true=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='metadataCriteriaRemoveRolelessEntityDescriptors', label='#Remove Roleless Entity Descriptors', selected=true, cssClass='pt-2 advanced-option', dataAttrs='param-skip-true=true')}"/>

                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='validateMetadataCertificates', label='#Validate Metadata Certificates', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='signUnsolicitedAuthnRequest', label='#Sign Unsolicited AuthnRequest', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>

                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingSessionNotOnOrAfter', label='#Skip Generating Session NotOnOrAfter', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingAssertionNameId', label='#Skip Generating Assertion NameID', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingSubjectConfirmationInResponseTo', label='#Skip Generating SubjectConfirmation InResponseTo', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='isSkipGeneratingResponseInResponseTo', label='#Skip Generating Response InResponseTo', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingSubjectConfirmationNotOnOrAfter', label='#Skip Generating SubjectConfirmation NotOnOrAfter', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingSubjectConfirmationRecipient', label='#Skip Generating SubjectConfirmation Recipient', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingSubjectConfirmationAddress', label='#Skip Generating SubjectConfirmation Address', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingSubjectConfirmationNotBefore', label='#Skip Generating SubjectConfirmation NotBefore', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingSubjectConfirmationNameId', label='#Skip Generating SubjectConfirmation NameID', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingNameIdQualifiers', label='#Skip Generating NameID Qualifiers', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingTransientNameId', label='#Skip Generating Transient NameID', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipValidatingAuthnRequest', label='#Skip Validating AuthnRequest', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingServiceProviderNameIdQualifier', label='#Skip Generating SP NameID Qualifier', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingAuthenticatingAuthority', label='#Skip Generating Authenticating Authority', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='skipGeneratingNameIdQualifier', label='#Skip Generating NameID Qualifier', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>

                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='encryptAssertions', label='#Encrypt Assertions', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='encryptAttributes', label='#Encrypt Attributes', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='encryptionOptional', label='#Encryption Optional', cssClass='pt-2 advanced-option', dataAttrs='param-skip-false=true')}"/>

                                                 <section class="pt-4 advanced-option"
                                                          id="editServiceWizardSamlAttributeNameFormatsContainer">
                                                     <h3>Attribute Name Formats</h3>
                                                     <script type="text/javascript">
                                                         createMappedInputField({
                                                             containerId: "editServiceWizardSamlAttributeNameFormatsContainer",
                                                             keyField: "attributeName-format",
                                                             keyLabel: "Attribute Name",
                                                             valueField: "attributeFormatValue",
                                                             valueLabel: "Attribute Format (i.e. basic, uri, unspecified, etc)",
                                                             containerField: "attributeNameFormats"
                                                         });
                                                     </script>
                                                 </section>

                                                 <section class="pt-4 advanced-option"
                                                          id="editServiceWizardSamlAttributeFriendlyNamesContainer">
                                                     <h3>Attribute Friendly Names</h3>
                                                     <script type="text/javascript">
                                                         createMappedInputField({
                                                             containerId: "editServiceWizardSamlAttributeFriendlyNamesContainer",
                                                             keyField: "attributeName-friendly",
                                                             keyLabel: "Attribute Name",
                                                             valueField: "attributeFriendlyName",
                                                             valueLabel: "Attribute Friendly Name",
                                                             containerField: "attributeFriendlyNames"
                                                         });
                                                     </script>
                                                 </section>

                                                 <section class="pt-4 advanced-option"
                                                          id="editServiceWizardSamlAttributeValueTypesContainer">
                                                     <h3>Attribute Value Types</h3>
                                                     <script type="text/javascript">
                                                         createMappedInputField({
                                                             containerId: "editServiceWizardSamlAttributeValueTypesContainer",
                                                             keyField: "attributeName-valueType",
                                                             keyLabel: "Attribute Name",
                                                             valueField: "attributeValueType",
                                                             valueLabel: "Attribute Value Type (i.e. <code>XSString, XSURI, NameIDType</code>, etc)",
                                                             containerField: "attributeValueTypes"
                                                         });
                                                     </script>
                                                 </section>

                                                 <section class="pt-4 advanced-option"
                                                          id="editServiceWizardSamlMetadataCriteriaEntityAttributesContainer">
                                                     <h3>Metadata Criteria Entity Attributes</h3>
                                                     <script type="text/javascript">
                                                         createMappedInputField({
                                                             containerId: "editServiceWizardSamlMetadataCriteriaEntityAttributesContainer",
                                                             keyField: "metadataCriteriaEntityAttribute",
                                                             keyLabel: "Entity Attribute",
                                                             valueField: "metadataCriteriaEntityAttributeValue",
                                                             valueLabel: "Entity attribute value(s) separated by commas (i.e. <code>http://refeds.org/category/research-and-scholarship</code>)",
                                                             containerField: "metadataCriteriaEntityAttributes",
                                                             multipleValues: true
                                                         });
                                                     </script>
                                                 </section>
                                                 
                                             </div>
                                        </div>

                                        <h3 class="class-WSFederationRegisteredService">WS-Federation Relying Party</h3>
                                        <div class="class-WSFederationRegisteredService"
                                             id="editServiceWizardMenuItemWsFederationRelyingParty">
                                            <p>This section defines properties and settings applicable to WS-Federation relying parties.</p>
                                             <div id="editServiceWizardWSFederationContainer"
                                                  class="mdc-input-group-field mdc-input-group-field-append w-100">
                                                 <script type="text/javascript">
                                                       createInputField({
                                                           labelTitle: "Realm",
                                                           name: "registeredServiceWsFederationRealm",
                                                           paramName: "realm",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Defines the WS-Federation realm for the relying party."
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "Protocol",
                                                           name: "registeredServiceWsFederationProtocol",
                                                           paramName: "protocol",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Defines the WS-Federation protocol to be used (e.g., <code>http://docs.oasis-open.org/ws-sx/ws-trust/200512</code>)."
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "Token Type",
                                                           name: "registeredServiceWsFederationTokenType",
                                                           paramName: "tokenType",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Defines the WS-Federation token type to be used (e.g., <code>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</code>)."
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "WSDL Location",
                                                           name: "registeredServiceWsFederationWsdlLocation",
                                                           paramName: "wsdlLocation",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Specifies the location of the WSDL for the WS-Federation relying party."
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "Namespace",
                                                           name: "registeredServiceWsFederationNamespace",
                                                           paramName: "namespace",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Defines the WS-Federation namespace for the relying party (i.e. <code>http://docs.oasis-open.org/ws-sx/ws-trust/200512/</code>"
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "Addressing Namespace",
                                                           name: "registeredServiceWsFederationAddressingNamespace",
                                                           paramName: "addressingNamespace",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Defines the WS-Addressing namespace for the relying party (i.e. <code>http://www.w3.org/2005/08/addressing</code>)"
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "Policy Namespace",
                                                           name: "registeredServiceWsFederationPolicyNamespace",
                                                           paramName: "policyNamespace",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Defines the WS-Policy namespace for the relying party."
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "WSDL Service",
                                                           name: "registeredServiceWsFederationWsdlService",
                                                           paramName: "wsdlService",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Specifies the WSDL service name for the WS-Federation relying party (i.e. <code>SecurityTokenService</code>)"
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "WSDL Endpoint",
                                                           name: "registeredServiceWsFederationWsdlEndpoint",
                                                           paramName: "wsdlEndpoint",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Specifies the WSDL endpoint name for the WS-Federation relying party"
                                                       }).on("input", generateServiceDefinition);

                                                       createInputField({
                                                           cssClasses: "advanced-option",
                                                           labelTitle: "Applies To",
                                                           name: "registeredServiceWsFederationAppliesTo",
                                                           paramName: "appliesTo",
                                                           required: false,
                                                           containerId: "editServiceWizardWSFederationContainer",
                                                           title: "Controls to whom security tokens apply. Defaults to the realm value."
                                                       }).on("input", generateServiceDefinition);
                                                 </script>
                                             </div>
                                        </div>
                                        
                                          <h3 class="advanced-option">Application Expiration Policy</h3>
                                          <div id="editServiceWizardMenuItemExpirationPolicy">

                                                <script type="text/javascript">
                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceExpirationPolicy",
                                                        labelTitle: "Expiration Date",
                                                        name: "registeredServiceExpirationPolicyExpirationDate",
                                                        paramName: "expirationPolicy.expirationDate",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemExpirationPolicy",
                                                        title: "Specifies the expiration date for the registered service in the format YYYY-MM-DD."
                                                    }).on("input", generateServiceDefinition);

                                                </script>
                                              
                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='deleteWhenExpired',
                                                    title='When enabled, the service will be deleted upon expiration',
                                                    label='#Delete When Expired', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=expirationPolicy.deleteWhenExpired')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='notifyWhenDeleted',
                                                    title='When enabled, a notification will be sent when the service is deleted upon expiration',
                                                    label='#Notify When Deleted', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=expirationPolicy.notifyWhenDeleted')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='notifyWhenExpired',
                                                    title='When enabled, a notification will be sent when the service is expired',
                                                    label='#Notify When Expired', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=expirationPolicy.notifyWhenExpired')}"/>

                                              
                                          </div>
                                         
                                          <h3 class="advanced-option">Ticket-Granting Ticket Expiration Policy</h3>
                                          <div id="editServiceWizardMenuItemTGTExpirationPolicy">
                                              <script type="text/javascript">
                                                     createInputField({
                                                         paramType: "org.apereo.cas.services.DefaultRegisteredServiceTicketGrantingTicketExpirationPolicy",
                                                         labelTitle: "Max Time to Live",
                                                         name: "registeredServiceTicketGrantingTicketExpirationPolicyMaxTimeToLive",
                                                         paramName: "ticketGrantingTicketExpirationPolicy.maxTimeToLiveInSeconds",
                                                         required: false,
                                                         containerId: "editServiceWizardMenuItemTGTExpirationPolicy",
                                                         title: "Control how long the ticket should be valid, in seconds."
                                                     }).attr("type", "number").on("input", generateServiceDefinition);

                                                     createMappedInputField({
                                                         header: "User Agents",
                                                         containerType: "org.apereo.cas.services.DefaultRegisteredServiceTicketGrantingTicketExpirationPolicy",
                                                         containerId: "editServiceWizardMenuItemTGTExpirationPolicy",
                                                         keyField: "registeredServiceTGTExpirationPolicyUserAgentName",
                                                         keyLabel: "User Agent",
                                                         valueField: "registeredServiceTGTExpirationPolicyUserAgentExpirationValue",
                                                         valueFieldType: "number",
                                                         valueLabel: "Max Time to Live (in seconds)",
                                                         containerField: "ticketGrantingTicketExpirationPolicy.userAgents"
                                                     });

                                                     createMappedInputField({
                                                         header: "IP Addresses",
                                                         containerType: "org.apereo.cas.services.DefaultRegisteredServiceTicketGrantingTicketExpirationPolicy",
                                                         containerId: "editServiceWizardMenuItemTGTExpirationPolicy",
                                                         keyField: "registeredServiceTGTExpirationPolicyIPName",
                                                         keyLabel: "IP Address",
                                                         valueField: "registeredServiceTGTExpirationPolicyIPExpirationValue",
                                                         valueLabel: "Max Time to Live (in seconds)",
                                                         valueFieldType: "number",
                                                         containerField: "ticketGrantingTicketExpirationPolicy.ipAddresses"
                                                     });
                                              </script>
                                          </div>

                                         <h3 class="class-CasRegisteredService advanced-option">Service Ticket Expiration Policy</h3>
                                         <div class="class-CasRegisteredService"
                                              id="editServiceWizardMenuItemSTExpirationPolicy">

                                               <script type="text/javascript">
                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceServiceTicketExpirationPolicy",
                                                        labelTitle: "Number of Uses",
                                                        name: "registeredServiceTicketExpirationPolicyNumberOfUses",
                                                        paramName: "serviceTicketExpirationPolicy.numberOfUses",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemSTExpirationPolicy",
                                                        title: "Control the number of times the ticket can be used"
                                                    }).attr("type", "number").on("input", generateServiceDefinition);

                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceServiceTicketExpirationPolicy",
                                                        labelTitle: "Time to Live",
                                                        name: "registeredServiceTicketExpirationPolicyTimeToLive",
                                                        paramName: "serviceTicketExpirationPolicy.timeToLive",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemSTExpirationPolicy",
                                                        title: "Control how long the ticket should be valid, in seconds."
                                                    }).attr("type", "number").on("input", generateServiceDefinition);

                                                </script>
                                             
                                         </div>
                                         <h3 class="class-CasRegisteredService advanced-option">Proxy-granting Ticket Expiration Policy</h3>
                                         <div class="class-CasRegisteredService"
                                              id="editServiceWizardMenuItemPGTExpirationPolicy">

                                             <script type="text/javascript">
                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceProxyTicketExpirationPolicy",
                                                        labelTitle: "Max Time to Live",
                                                        name: "registeredServiceProxyGrantingTicketExpirationPolicyMaxTimeToLive",
                                                        paramName: "proxyGrantingTicketExpirationPolicy.maxTimeToLiveInSeconds",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemPGTExpirationPolicy",
                                                        title: "Control how long the ticket should be valid, in seconds."
                                                    }).attr("type", "number").on("input", generateServiceDefinition);

                                                </script>

                                         </div>
                                         <h3 class="class-CasRegisteredService advanced-option">Proxy Ticket Expiration Policy</h3>
                                         <div class="class-CasRegisteredService"
                                              id="editServiceWizardMenuItemPTExpirationPolicy">

                                             <script type="text/javascript">
                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceProxyTicketExpirationPolicy",
                                                        labelTitle: "Number of Uses",
                                                        name: "registeredServiceProxyTicketExpirationPolicyNumberOfUses",
                                                        paramName: "proxyTicketExpirationPolicy.numberOfUses",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemPTExpirationPolicy",
                                                        title: "Control the number of times the ticket can be used"
                                                    }).attr("type", "number").on("input", generateServiceDefinition);

                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceProxyTicketExpirationPolicy",
                                                        labelTitle: "Time to Live",
                                                        name: "registeredServiceProxyTicketExpirationPolicyTimeToLive",
                                                        paramName: "proxyTicketExpirationPolicy.timeToLive",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemPTExpirationPolicy",
                                                        title: "Control how long the ticket should be valid, in seconds."
                                                    }).attr("type", "number").on("input", generateServiceDefinition);

                                                </script>
                                             
                                         </div>
                                        
                                         <h3 class="class-CasRegisteredService advanced-option">Proxy Policy</h3>
                                         <div class="class-CasRegisteredService"
                                              id="editServiceWizardMenuItemProxyAuthenticationPolicy">

                                             <script type="text/javascript">
                                                 function handleRegisteredServiceProxyPolicyChange(select) {
                                                     const type = getLastWord($(select).val());
                                                     $(`#editServiceWizardMenuItemProxyAuthenticationPolicy .${type}`).show();
                                                     $("#editServiceWizardMenuItemProxyAuthenticationPolicy [id$='FieldContainer']")
                                                         .not(`.${type}`)
                                                         .hide();
                                                     $("#editServiceWizardMenuItemProxyAuthenticationPolicy [id$='MapContainer']")
                                                         .not(`.${type}`)
                                                         .hide();
                                                     $("#editServiceWizardMenuItemProxyAuthenticationPolicy [id$='ButtonPanel']")
                                                         .not(`.${type}`)
                                                         .hide();
                                                     $("#editServiceWizardMenuItemProxyAuthenticationPolicy [id$='FieldContainer'] input")
                                                         .val("");
                                                     $("#editServiceWizardMenuItemProxyAuthenticationPolicy [id$='MapContainer'] input")
                                                         .val("");
                                                     $("#editServiceWizardMenuItemProxyAuthenticationPolicy [id$='ButtonPanel'] button")
                                                         .each(function () {
                                                             const selected = $(this).data("param-selected");
                                                             if (selected) {
                                                                 $(this).click();
                                                             }
                                                         });
                                                 }

                                                 createSelectField({
                                                     containerId: "editServiceWizardMenuItemProxyAuthenticationPolicy",
                                                     labelTitle: "Type:",
                                                     paramName: "proxyPolicy",
                                                     options: [
                                                         {
                                                             value: "org.apereo.cas.services.RefuseRegisteredServiceProxyPolicy",
                                                             text: "REFUSE",
                                                             selected: true
                                                         },
                                                         {
                                                             value: "org.apereo.cas.services.RegexMatchingRegisteredServiceProxyPolicy",
                                                             text: "REGEX"
                                                         },
                                                         {
                                                             value: "org.apereo.cas.services.RestfulRegisteredServiceProxyPolicy",
                                                             text: "REST"
                                                         }

                                                     ],
                                                     helpText: "Specifies the strategy to determine the username attribute.",
                                                     changeEventHandlers: "handleRegisteredServiceProxyPolicyChange"
                                                 })
                                                     .data("renderer", function (value) {
                                                         return {"@class": value};
                                                     });

                                                 createInputField({
                                                     cssClasses: "hide RegexMatchingRegisteredServiceProxyPolicy",
                                                     labelTitle: "Pattern",
                                                     name: "registeredServiceProxyPolicyRegexPattern",
                                                     paramName: "proxyPolicy.pattern",
                                                     required: false,
                                                     containerId: "editServiceWizardMenuItemProxyAuthenticationPolicy",
                                                     title: "Specifies the URL pattern that is allowed for proxy authentication"
                                                 }).on("input", generateServiceDefinition);

                                                 createInputField({
                                                     cssClasses: "hide RestfulRegisteredServiceProxyPolicy",
                                                     labelTitle: "Endpoint",
                                                     name: "registeredServiceProxyPolicyRestEndpoint",
                                                     paramName: "proxyPolicy.endpoint",
                                                     required: false,
                                                     containerId: "editServiceWizardMenuItemProxyAuthenticationPolicy",
                                                     title: "Specifies the endpoint CAS must reach to determine proxy authentication eligibility"
                                                 }).on("input", generateServiceDefinition);

                                                 createMappedInputField({
                                                     cssClasses: "hide RestfulRegisteredServiceProxyPolicy",
                                                     containerId: "editServiceWizardMenuItemProxyAuthenticationPolicy",
                                                     keyField: "proxyPolicyHeaderName",
                                                     keyLabel: "Header Name",
                                                     valueField: "proxyPolicyHeaderValue",
                                                     valueLabel: "Header Value",
                                                     containerField: "proxyPolicy.headers"
                                                 });
                                                 
                                             </script>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='proxyAuthenticationUseServiceId',
                                                    title='When enabled, the service ID pattern will be used in proxy policy enforcement',
                                                    label='#Use Service ID', cssClass='pt-2 hide RegexMatchingRegisteredServiceProxyPolicy',
                                                    dataAttrs='param-skip-false=true,param-name=proxyPolicy.useServiceId')}"/>
                                             <div th:replace="~{fragments/switchbutton :: switchbutton (id='proxyAuthenticationExactMatch',
                                                    title='When enabled, an exact match is required for proxy policy enforcement',
                                                    label='#Exact Match', cssClass='pt-2 hide RegexMatchingRegisteredServiceProxyPolicy',
                                                    dataAttrs='param-skip-false=true,param-name=proxyPolicy.exactMatch')}"/>
                                         </div>


                                         <h3 class="class-OAuthRegisteredService class-OidcRegisteredService">OAuth / OpenID Connect Code Expiration Policy</h3>
                                         <div class="class-OAuthRegisteredService class-OidcRegisteredService"
                                              id="editServiceWizardMenuItemOAuthOidcCodeExpirationPolicy">

                                         </div>

                                        <h3 class="class-OAuthRegisteredService class-OidcRegisteredService">OAuth / OpenID Connect Access Token Expiration Policy</h3>
                                         <div class="class-OAuthRegisteredService class-OidcRegisteredService"
                                              id="editServiceWizardMenuItemOAuthOidcATExpirationPolicy">

                                         </div>

                                        <h3 class="class-OAuthRegisteredService class-OidcRegisteredService">OAuth / OpenID Connect Refresh Token Expiration Policy</h3>
                                         <div class="class-OAuthRegisteredService class-OidcRegisteredService"
                                              id="editServiceWizardMenuItemOAuthOidcRTExpirationPolicy">

                                         </div>

                                         <h3 class="class-OAuthRegisteredService class-OidcRegisteredService">OAuth / OpenID Connect Device Token Expiration Policy</h3>
                                         <div class="class-OAuthRegisteredService class-OidcRegisteredService"
                                              id="editServiceWizardMenuItemOAuthOidcDTExpirationPolicy">

                                         </div>

                                         <h3 class="class-OidcRegisteredService">OpenID Connect ID Token Expiration Policy</h3>
                                         <div class="class-OidcRegisteredService"
                                              id="editServiceWizardMenuItemOAuthOidcITExpirationPolicy">

                                         </div>

                                        <h3 class="class-OAuthRegisteredService class-OidcRegisteredService">OAuth / OpenID Connect Token Exchange Policy</h3>
                                         <div class="class-OAuthRegisteredService class-OidcRegisteredService"
                                              id="editServiceWizardMenuItemOAuthOidcTokenExchangePolicy">

                                         </div>
                                        
                                          <h3>Username Attribute Provider</h3>
                                          <div id="editServiceWizardMenuItemUsernameAttribute">
                                               <script type="text/javascript">
                                                   function handleUsernameAttributeProviderChange(select) {
                                                       const type = getLastWord($(select).val());
                                                       $(`#editServiceWizardMenuItemUsernameAttribute .${type}`).show();
                                                       $("#editServiceWizardMenuItemUsernameAttribute [id$='FieldContainer']")
                                                           .not(`.${type}`)
                                                           .not(".DefaultRegisteredServiceUsernameProvider")
                                                           .hide();
                                                       $("#editServiceWizardMenuItemUsernameAttribute [id$='FieldContainer'] input")
                                                           .val("");

                                                       const hideDefaults = $(select).find(":selected").data("hideDefaults");
                                                       if (hideDefaults) {
                                                           $("#editServiceWizardMenuItemUsernameAttribute .DefaultRegisteredServiceUsernameProvider").hide();
                                                       } else {
                                                           $("#editServiceWizardMenuItemUsernameAttribute .DefaultRegisteredServiceUsernameProvider").show();
                                                       }
                                                   }

                                                   createSelectField({
                                                       containerId: "editServiceWizardMenuItemUsernameAttribute",
                                                       labelTitle: "Type:",
                                                       paramName: "usernameAttributeProvider",
                                                       options: [
                                                           {
                                                               value: "org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider",
                                                               text: "DEFAULT",
                                                               selected: true
                                                           },
                                                           {
                                                               value: "org.apereo.cas.services.StaticRegisteredServiceUsernameProvider",
                                                               text: "STATIC",
                                                               data: {
                                                                   hideDefaults: true
                                                               }
                                                           },
                                                           {
                                                               value: "org.apereo.cas.services.AnonymousRegisteredServiceUsernameAttributeProvider",
                                                               text: "ANONYMOUS",
                                                               data: {
                                                                   hideDefaults: true,
                                                                   markerClass: true
                                                               }
                                                           },

                                                           ...(
                                                               scriptFactoryAvailable
                                                                   ? [{
                                                                       value: "org.apereo.cas.services.GroovyRegisteredServiceUsernameProvider",
                                                                       text: "GROOVY"
                                                                   }]
                                                                   : []
                                                           ),

                                                           {
                                                               value: "org.apereo.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider",
                                                               text: "PRINCIPAL ATTRIBUTE"
                                                           }
                                                       ],
                                                       helpText: "Specifies the strategy to determine the username attribute.",
                                                       changeEventHandlers: "handleUsernameAttributeProviderChange"
                                                   }).data("renderer", function (value) {
                                                       return {"@class": value};
                                                   });

                                                   createInputField({
                                                       cssClasses: "hide StaticRegisteredServiceUsernameProvider",
                                                       labelTitle: "Value",
                                                       name: "registeredServiceUsernameAttributeStaticValue",
                                                       paramName: "usernameAttributeProvider.value",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemUsernameAttribute",
                                                       title: "Specifies the static value to be used as the username."

                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "hide PrincipalAttributeRegisteredServiceUsernameProvider",
                                                       labelTitle: "Username Attribute",
                                                       name: "registeredServiceUsernameAttributeUsernameAttribute",
                                                       paramName: "usernameAttributeProvider.usernameAttribute",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemUsernameAttribute",
                                                       title: "Specifies the principal attribute to be used as the username."

                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "hide GroovyRegisteredServiceUsernameProvider",
                                                       labelTitle: "Groovy Script",
                                                       name: "registeredServiceUsernameAttributeGroovyValue",
                                                       paramName: "usernameAttributeProvider.groovyScript",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemUsernameAttribute",
                                                       title: "Specifies the Groovy script location, inline or external, to be used to generate the username."

                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "DefaultRegisteredServiceUsernameProvider",
                                                       labelTitle: "Scope",
                                                       name: "registeredServiceUsernameAttributeScope",
                                                       paramName: "usernameAttributeProvider.scope",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemUsernameAttribute",
                                                       title: "Specifies the scope to be appended to the username."
                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "DefaultRegisteredServiceUsernameProvider",
                                                       labelTitle: "Remove Pattern",
                                                       name: "registeredServiceUsernameAttributeRemovePattern",
                                                       paramName: "usernameAttributeProvider.removePattern",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemUsernameAttribute",
                                                       title: "Specifies a regex pattern to remove from the username."
                                                   }).on("input", generateServiceDefinition);

                                                   createSelectField({
                                                       cssClasses: "DefaultRegisteredServiceUsernameProvider",
                                                       containerId: "editServiceWizardMenuItemUsernameAttribute",
                                                       labelTitle: "Canonicalization Mode:",
                                                       paramName: "usernameAttributeProvider.canonicalizationMode",
                                                       options: [
                                                           {
                                                               value: "",
                                                               text: "NONE",
                                                               selected: true
                                                           },
                                                           {
                                                               value: "UPPER",
                                                               text: "UPPER"
                                                           },
                                                           {
                                                               value: "LOWER",
                                                               text: "LOWER"
                                                           }
                                                       ],
                                                       helpText: "Specifies the canonicalization mode for the username."
                                                   });
                                                   
                                               </script>

                                               <div th:replace="~{fragments/switchbutton :: switchbutton (id='encryptUsername',
                                                    title='Encrypting the username requires a public key to be defined for the registered service',
                                                    label='#Encrypt Username', cssClass='pt-2,DefaultRegisteredServiceUsernameProvider',
                                                    dataAttrs='param-skip-false=true,param-name=usernameAttributeProvider.encryptUsername')}"/>
                                          </div>

                                          <h3>Attribute Release Policy</h3>
                                          <div id="editServiceWizardMenuItemAttributeReleasePolicy">

                                          </div>

                                          <h3 id="registeredServiceMfaPolicy">Multifactor Authentication Policy</h3>
                                          <div id="editServiceWizardMenuItemMfaPolicy">
                                            <script type="text/javascript">
                                                createInputField({
                                                    labelTitle: "Multifactor Providers",
                                                    name: "registeredServiceMfaProviders",
                                                    paramName: "multifactorPolicy.multifactorAuthenticationProviders",
                                                    paramType: "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
                                                    required: false,
                                                    containerId: "editServiceWizardMenuItemMfaPolicy",
                                                    title: "Define the multifactor authentication providers to be used, separated by commas."
                                                }).on("input", generateServiceDefinition)
                                                    .data("renderer", function (value) {
                                                        return ["java.util.HashSet", value.split(",")];
                                                    });

                                                createSelectField({
                                                    cssClasses: "advanced-option",
                                                    paramType: "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
                                                    containerId: "editServiceWizardMenuItemMfaPolicy",
                                                    labelTitle: "Failure Mode:",
                                                    paramName: "multifactorPolicy.failureMode",
                                                    options: [
                                                        {
                                                            value: "",
                                                            text: "UNDEFINED",
                                                            selected: true
                                                        },
                                                        {
                                                            value: "OPEN",
                                                            text: "OPEN"
                                                        },
                                                        {
                                                            value: "CLOSED",
                                                            text: "CLOSED"
                                                        },
                                                        {
                                                            value: "PHANTOM",
                                                            text: "PHANTOM"
                                                        },
                                                        {
                                                            value: "NONE",
                                                            text: "NONE"
                                                        }
                                                    ],
                                                    helpText: "Specifies the failure mode for multifactor authentication."
                                                });

                                                createInputField({
                                                    paramType: "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
                                                    cssClasses: "advanced-option",
                                                    labelTitle: "Principal Attribute Name Trigger",
                                                    name: "registeredServiceMfaPrincipalAttributeNameTrigger",
                                                    paramName: "multifactorPolicy.principalAttributeNameTrigger",
                                                    required: false,
                                                    containerId: "editServiceWizardMenuItemMfaPolicy",
                                                    title: "Specifies the principal attribute name that triggers multifactor authentication."
                                                }).on("input", generateServiceDefinition);

                                                createInputField({
                                                    paramType: "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
                                                    cssClasses: "advanced-option",
                                                    labelTitle: "Principal Attribute Value To Match",
                                                    name: "registeredServiceMfaPrincipalAttributeValueToMatch",
                                                    paramName: "multifactorPolicy.principalAttributeValueToMatch",
                                                    required: false,
                                                    containerId: "editServiceWizardMenuItemMfaPolicy",
                                                    title: "Specifies the principal attribute value to match for triggering multifactor authentication."
                                                }).on("input", generateServiceDefinition);

                                                createInputField({
                                                    paramType: "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
                                                    cssClasses: "advanced-option",
                                                    labelTitle: "Principal Attribute Name Bypass",
                                                    name: "registeredServiceMfaBypassPrincipalAttributeName",
                                                    paramName: "multifactorPolicy.bypassPrincipalAttributeName",
                                                    required: false,
                                                    containerId: "editServiceWizardMenuItemMfaPolicy",
                                                    title: "Specifies the principal attribute name that bypasses multifactor authentication."
                                                }).on("input", generateServiceDefinition);

                                                createInputField({
                                                    paramType: "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
                                                    cssClasses: "advanced-option",
                                                    labelTitle: "Principal Attribute Value Bypass",
                                                    name: "registeredServiceMfaBypassPrincipalAttributeValue",
                                                    paramName: "multifactorPolicy.bypassPrincipalAttributeValue",
                                                    required: false,
                                                    containerId: "editServiceWizardMenuItemMfaPolicy",
                                                    title: "Specifies the principal attribute value that bypasses multifactor authentication."
                                                }).on("input", generateServiceDefinition);

                                                if (scriptFactoryAvailable) {
                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
                                                        cssClasses: "advanced-option",
                                                        labelTitle: "Groovy Script",
                                                        name: "registeredServiceMfaScript",
                                                        paramName: "multifactorPolicy.script",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemMfaPolicy",
                                                        title: "Specifies the Groovy script location, inline or external, to determine multifactor authentication."
                                                    }).on("input", generateServiceDefinition);
                                                }

                                            </script>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='bypassEnabled',
                                                    title='When enabled, the multifactor authentication policy can be bypassed based on defined criteria',
                                                    label='#Bypass Multifactor Authentication', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=multifactorPolicy.bypassEnabled,param-type=org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='forceExecution',
                                                    title='When enabled, multifactor authentication is forced for this service',
                                                    label='#Force Multifactor Authentication', cssClass='pt-2 advanced-option',
                                                    dataAttrs='param-skip-false=true,param-name=multifactorPolicy.forceExecution,param-type=org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='bypassTrustedDeviceEnabled',
                                                    title='When enabled, trusted devices are allowed to bypass multifactor authentication',
                                                    label='#Bypass Trusted Devices', cssClass='advanced-option',
                                                    dataAttrs='param-skip-false=true,param-name=multifactorPolicy.bypassTrustedDeviceEnabled,param-type=org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='bypassIfMissingPrincipalAttribute',
                                                    title='When enabled, multifactor authentication is bypassed if the principal attribute used for triggering is missing',
                                                    label='#Bypass If Missing Principal Attribute', cssClass='pt-2 advanced-option',
                                                    dataAttrs='param-skip-false=true,param-name=multifactorPolicy.bypassIfMissingPrincipalAttribute,param-type=org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy')}"/>
                                          </div>

                                          <h3 class="advanced-option">Matching Strategy</h3>
                                          <div id="editServiceWizardMenuItemMatchingStrategy">
                                                <script type="text/javascript">
                                                    function handleMatchingStrategyChange(select) {
                                                        const type = getLastWord($(select).val());
                                                        console.log("Selected matching strategy type:", type);
                                                        $(`#editServiceWizardMenuItemMatchingStrategy .${type}`).show();
                                                        $("#editServiceWizardMenuItemMatchingStrategy [id$='ButtonPanel']")
                                                            .not(`.${type}`)
                                                            .hide();

                                                    }

                                                    createSelectField({
                                                        containerId: "editServiceWizardMenuItemMatchingStrategy",
                                                        labelTitle: "Type:",
                                                        paramName: "matchingStrategy",
                                                        options: [
                                                            {
                                                                value: "org.apereo.cas.services.FullRegexRegisteredServiceMatchingStrategy",
                                                                text: "FULL REGEX",
                                                                selected: true
                                                            },
                                                            {
                                                                value: "org.apereo.cas.services.PartialRegexRegisteredServiceMatchingStrategy",
                                                                text: "PARTIAL REGEX",
                                                                data: {
                                                                    markerClass: true
                                                                }
                                                            },
                                                            {
                                                                value: "org.apereo.cas.services.LiteralRegisteredServiceMatchingStrategy",
                                                                text: "LITERAL",
                                                                data: {
                                                                    markerClass: true
                                                                }
                                                            }
                                                        ],
                                                        helpText: "Specifies the strategy to determine how service IDs are matched.",
                                                        changeEventHandlers: "handleMatchingStrategyChange"
                                                    }).data("renderer", function (value) {
                                                        return {"@class": value};
                                                    });
                                                    
                                                </script>

                                            <div th:replace="~{fragments/switchbutton :: switchbutton (id='matchingStrategyCaseInsensitive',
                                                title='When enabled, service ID matching is performed in a case-insensitive manner',
                                                label='#Case Insensitive', cssClass='pt-2 hide LiteralRegisteredServiceMatchingStrategy',
                                                dataAttrs='param-skip-false=true,param-name=matchingStrategy.caseInsensitive')}"/>
                                          </div>


                                          <h3>Access Strategy</h3>
                                          <div id="editServiceWizardMenuItemAccessStrategy">
                                               <script type="text/javascript">
                                                   function handleAccessStrategyChange(select) {
                                                       const type = getLastWord($(select).val());
                                                       $(`#editServiceWizardMenuItemAccessStrategy .${type}`).show();
                                                       $("#editServiceWizardMenuItemAccessStrategy [id$='FieldContainer']")
                                                           .not(`.${type}`)
                                                           .hide();
                                                       $("#editServiceWizardMenuItemAccessStrategy [id$='ButtonPanel']")
                                                           .not(`.${type}`)
                                                           .hide();
                                                       $("#editServiceWizardMenuItemAccessStrategy [id$='MapContainer']")
                                                           .not(`.${type}`)
                                                           .hide();
                                                       $("#editServiceWizardMenuItemAccessStrategy [id$='FieldContainer'] input")
                                                           .val("");
                                                       $("#editServiceWizardMenuItemAccessStrategy [id$='MapContainer'] input")
                                                           .val("");
                                                       $("#editServiceWizardMenuItemAccessStrategy [id$='ButtonPanel'] button")
                                                           .each(function () {
                                                               const selected = $(this).data("param-selected");
                                                               if (selected) {
                                                                   $(this).click();
                                                               }
                                                           });
                                                   }

                                                   createSelectField({
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       labelTitle: "Type:",
                                                       paramName: "accessStrategy",
                                                       options: [
                                                           {
                                                               value: "org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy",
                                                               text: "DEFAULT",
                                                               selected: true
                                                           },
                                                           {
                                                               value: "org.apereo.cas.services.RemoteEndpointServiceAccessStrategy",
                                                               text: "REMOTE",
                                                           },
                                                           {
                                                               value: "org.apereo.cas.services.HttpRequestRegisteredServiceAccessStrategy",
                                                               text: "HTTP REQUEST",
                                                           },
                                                           {
                                                               value: "org.apereo.cas.grouper.services.GrouperRegisteredServiceAccessStrategy",
                                                               text: "GROUPER",
                                                           },
                                                           ...(
                                                               scriptFactoryAvailable
                                                                   ? [{
                                                                       value: "org.apereo.cas.services.GroovyRegisteredServiceAccessStrategy",
                                                                       text: "GROOVY",
                                                                   }]
                                                                   : []
                                                           )
                                                       ],
                                                       helpText: "Specifies the access strategy for the registered service.",
                                                       changeEventHandlers: "handleAccessStrategyChange"
                                                   }).data("renderer", function (value) {
                                                       return {"@class": value};
                                                   });

                                                   createInputField({
                                                       cssClasses: "hide HttpRequestRegisteredServiceAccessStrategy",
                                                       labelTitle: "IP Address",
                                                       name: "registeredServiceAccessStrategyIpAddress",
                                                       paramName: "accessStrategy.ipAddress",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       title: "Specifies the IP address to be used for access strategy."
                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "hide HttpRequestRegisteredServiceAccessStrategy",
                                                       labelTitle: "User Agent",
                                                       name: "registeredServiceAccessStrategyUserAgent",
                                                       paramName: "accessStrategy.userAgent",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       title: "Specifies the user agent to be used for access strategy."
                                                   }).on("input", generateServiceDefinition);

                                                   createMappedInputField({
                                                       cssClasses: "hide HttpRequestRegisteredServiceAccessStrategy",
                                                       header: "Headers",
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       keyField: "registeredServiceAccessStrategyHttpRequestHeaderName",
                                                       keyLabel: "Header Name",
                                                       valueField: "registeredServiceAccessStrategyHttpRequestHeaderValue",
                                                       valueLabel: "Header Value",
                                                       containerField: "accessStrategy.headers"
                                                   });
                                                   
                                                   createSelectField({
                                                       cssClasses: "hide GrouperRegisteredServiceAccessStrategy",
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       labelTitle: "Group Field:",
                                                       paramName: "accessStrategy.groupField",
                                                       options: [
                                                           {value: "", text: "NAME", selected: true},
                                                           {value: "EXTENSION", text: "EXTENSION"},
                                                           {value: "DISPLAY_NAME", text: "DISPLAY_NAME"},
                                                           {value: "DISPLAY_EXTENSION", text: "DISPLAY_EXTENSION"},
                                                       ],
                                                       helpText: "Specifies the group field to be used when evaluating group membership.",
                                                   });
                                                   
                                                   createMappedInputField({
                                                       cssClasses: "hide GrouperRegisteredServiceAccessStrategy",
                                                       header: "Configuration Properties",
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       keyField: "registeredServiceAccessStrategyGrouperConfigPropName",
                                                       keyLabel: "Property Name",
                                                       valueField: "registeredServiceAccessStrategyGrouperConfigPropValue",
                                                       valueLabel: "Property Value",
                                                       containerField: "accessStrategy.configProperties"
                                                   });
                                                   
                                                   createInputField({
                                                       cssClasses: "hide RemoteEndpointServiceAccessStrategy",
                                                       labelTitle: "URL",
                                                       name: "registeredServiceAccessStrategyEndpointUrl",
                                                       paramName: "accessStrategy.endpointUrl",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       title: "Specifies the remote endpoint URL to determine access strategy."
                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "hide RemoteEndpointServiceAccessStrategy",
                                                       labelTitle: "Acceptable Response Codes",
                                                       name: "registeredServiceAccessStrategyEndpointAcceptableResponseCodes",
                                                       paramName: "accessStrategy.acceptableResponseCodes",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       title: "Specifies the acceptable response codes from the remote endpoint to determine access strategy, separated by comma."
                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "hide RemoteEndpointServiceAccessStrategy",
                                                       labelTitle: "HTTP Method",
                                                       name: "registeredServiceAccessStrategyEndpointHttpMethod",
                                                       paramName: "accessStrategy.method",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       title: "Specifies the HTTP method (i.e. <code>GET, POST, etc</code>) to use when contacting the remote endpoint."
                                                   }).on("input", generateServiceDefinition);

                                                   createMappedInputField({
                                                       cssClasses: "hide RemoteEndpointServiceAccessStrategy",
                                                       header: "Headers",
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       keyField: "registeredServiceAccessStrategyEndpointHeaderName",
                                                       keyLabel: "Header Name",
                                                       valueField: "registeredServiceAccessStrategyEndpointHeaderValue",
                                                       valueLabel: "Header Value",
                                                       containerField: "accessStrategy.headers"
                                                   });


                                                   createInputField({
                                                       cssClasses: "hide GroovyRegisteredServiceAccessStrategy",
                                                       labelTitle: "Groovy Script",
                                                       name: "registeredServiceAccessStrategyGroovyScript",
                                                       paramName: "accessStrategy.groovyScript",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       title: "Specifies the Groovy script location, inline or external, to determine access strategy."
                                                   }).on("input", generateServiceDefinition);

                                                   createInputField({
                                                       cssClasses: "DefaultRegisteredServiceAccessStrategy",
                                                       labelTitle: "Unauthorized Redirect URL",
                                                       name: "registeredServiceAccessStrategyUnauthorizedRedirectUrl",
                                                       paramName: "accessStrategy.unauthorizedRedirectUrl",
                                                       required: false,
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       title: "Specifies the URL to redirect to when access is unauthorized."
                                                   }).on("input", generateServiceDefinition);

                                                   createMappedInputField({
                                                       cssClasses: "DefaultRegisteredServiceAccessStrategy GrouperRegisteredServiceAccessStrategy",
                                                       header: "Required Attributes",
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       keyField: "registeredServiceAccessStrategyReqAttrName",
                                                       keyLabel: "Attribute Name",
                                                       valueField: "registeredServiceAccessStrategyReqAttrValue",
                                                       valueLabel: "Attribute Value",
                                                       containerField: "accessStrategy.requiredAttributes",
                                                       multipleValues: true,
                                                       multipleValuesType: "java.util.HashSet"
                                                   });

                                                   createMappedInputField({
                                                       cssClasses: "DefaultRegisteredServiceAccessStrategy",
                                                       header: "Rejected Attributes",
                                                       containerId: "editServiceWizardMenuItemAccessStrategy",
                                                       keyField: "registeredServiceAccessStrategyRejectedAttrName",
                                                       keyLabel: "Attribute Name",
                                                       valueField: "registeredServiceAccessStrategyRejectedAttrValue",
                                                       valueLabel: "Attribute Value",
                                                       containerField: "accessStrategy.rejectedAttributes",
                                                       multipleValues: true,
                                                       multipleValuesType: "java.util.HashSet"
                                                   });

                                                   
                                                </script>
                                              
                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='accessStrategyEnabled',
                                                    title='Determine if this service is enabled',
                                                    label='#Enabled', selected=true, cssClass='pt-3 DefaultRegisteredServiceAccessStrategy',
                                                    dataAttrs='param-skip-true=true,param-name=accessStrategy.enabled,param-type=org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='accessStrategySsoEnabled',
                                                    title='Determine if this service is enabled for SSO',
                                                    label='#Single Sign-on Enabled', selected=true, cssClass='pt-2 DefaultRegisteredServiceAccessStrategy',
                                                    dataAttrs='param-skip-true=true,param-name=accessStrategy.ssoEnabled,param-type=org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='accessStrategyRequireAllAttrs',
                                                    title='Require all attributes defined and available in the access strategy for access to be granted',
                                                    label='#Require All Attributes', selected=true, cssClass='pt-2 DefaultRegisteredServiceAccessStrategy',
                                                    dataAttrs='param-skip-true=true,param-name=accessStrategy.requireAllAttributes,param-type=org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy')}"/>

                                              <div th:replace="~{fragments/switchbutton :: switchbutton (id='accessStrategyCaseInsensitive',
                                                    title='When enabled, attribute matching is performed in a case-insensitive manner',
                                                    label='#Case Insensitive', cssClass='pt-2 DefaultRegisteredServiceAccessStrategy',
                                                    dataAttrs='param-skip-false=true,param-name=accessStrategy.caseInsensitive')}"/>
                                          </div>

                                         <h3 class="advanced-option">Authentication Policy</h3>
                                          <div id="editServiceWizardMenuItemAuthenticationPolicy">

                                          </div>

                                          <h3 class="advanced-option">Properties</h3>
                                          <div id="editServiceWizardMenuItemProperties">
                                            <script type="text/javascript">
                                                 createMappedInputField({
                                                     containerId: "editServiceWizardMenuItemProperties",
                                                     keyField: "registeredServicePropertyName",
                                                     keyLabel: "Property Name",
                                                     valueField: "registeredServicePropertyValue",
                                                     valueLabel: "Property value(s) separated by commas",
                                                     containerField: "properties",
                                                     valueFieldRenderer: function ($input) {
                                                         return {
                                                             "@class": "org.apereo.cas.services.DefaultRegisteredServiceProperty",
                                                             "values": ["java.util.HashSet", $input.val().split(",")]
                                                         };
                                                     }
                                                 });
                                             </script>
                                          </div>

                                          <h3 class="advanced-option">Contacts</h3>
                                          <div id="editServiceWizardMenuItemContacts">
                                               <script type="text/javascript">
                                                   for (let index = 0; index < 1; index++) {
                                                       const details = ["name", "email", "phone", "department", "type"];
                                                       details.forEach(detail => {
                                                           createInputField({
                                                               labelTitle: capitalize(detail),
                                                               name: `registeredServiceContact${capitalize(detail)}${index}`,
                                                               paramName: `contacts`,
                                                               required: false,
                                                               containerId: "editServiceWizardMenuItemContacts",
                                                               title: `Specify the contact's ${detail}`,
                                                               data: {
                                                                   "contact-field": detail,
                                                                   "contact-group": index
                                                               }
                                                           })
                                                               .data("renderer", function (value, $input, serviceDefinition) {
                                                                   const contact = {
                                                                       "@class": "org.apereo.cas.services.DefaultRegisteredServiceContact"
                                                                   };
                                                                   return ["java.util.ArrayList", [contact]];
                                                               })
                                                               .data("beforeGenerate", function ($input, serviceDefinition) {
                                                                   if (serviceDefinition["contacts"] && $input.val().length > 0) {
                                                                       const contactField = $input.data("contact-field");
                                                                       const contactGroup = Number($input.data("contact-group"));
                                                                       const contacts = serviceDefinition["contacts"][1][contactGroup];
                                                                       contacts[contactField] = $input.val();
                                                                   }
                                                               })
                                                               .on("input", generateServiceDefinition);
                                                       });
                                                   }

                                                   
                                               </script>
                                          </div>

                                        <h3 class="advanced-option">Public Key</h3>
                                        <div id="editServiceWizardMenuItemPublicKey">
                                            <script type="text/javascript">
                                                createInputField({
                                                    paramType: "org.apereo.cas.services.RegisteredServicePublicKeyImpl",
                                                    labelTitle: "Public Key Location",
                                                    name: "registeredServicePublicKeyLocation",
                                                    paramName: "publicKey.location",
                                                    required: false,
                                                    containerId: "editServiceWizardMenuItemPublicKey",
                                                    title: "Specifies the location of the public key used for encrypting attributes or the username."
                                                }).on("input", generateServiceDefinition);

                                                createInputField({
                                                    paramType: "org.apereo.cas.services.RegisteredServicePublicKeyImpl",
                                                    labelTitle: "Algorithm",
                                                    name: "registeredServicePublicKeyAlgorithm",
                                                    paramName: "publicKey.algorithm",
                                                    required: false,
                                                    containerId: "editServiceWizardMenuItemPublicKey",
                                                    title: "Specifies the algorithm used with the public key (i.e. <code>RSA</code>)."
                                                }).on("input", generateServiceDefinition);
                                            </script>
                                        </div>
                                        <h3 id="registeredServiceAcceptableUsagePolicy" class="advanced-option">Acceptable Usage Policy</h3>
                                          <div id="editServiceWizardMenuItemAUP">
                                              <script type="text/javascript">
                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceAcceptableUsagePolicy",
                                                        labelTitle: "Message Code",
                                                        name: "registeredServiceAUPMessageCode",
                                                        paramName: "acceptableUsagePolicy.messageCode",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemAUP",
                                                        title: "Specifies the message code to be shown to the user for the acceptable usage policy."
                                                    }).on("input", generateServiceDefinition);
                                                    createInputField({
                                                        paramType: "org.apereo.cas.services.DefaultRegisteredServiceAcceptableUsagePolicy",
                                                        labelTitle: "Text",
                                                        name: "registeredServiceAUPText",
                                                        paramName: "acceptableUsagePolicy.text",
                                                        required: false,
                                                        containerId: "editServiceWizardMenuItemAUP",
                                                        title: "Specifies the text to be shown to the user for the acceptable usage policy."
                                                    }).on("input", generateServiceDefinition);
                                                </script>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='enabled',
                                                    title='When enabled, the acceptable usage policy is enforced for this service',
                                                    label='#Enabled', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=acceptableUsagePolicy.enabled,param-type=org.apereo.cas.services.DefaultRegisteredServiceAcceptableUsagePolicy')}"/>
                                          </div>
                                        
                                       <h3 class="advanced-option">Single SignOn Participation Policy</h3>
                                          <div id="editServiceWizardMenuItemSSOParticipationPolicy">

                                          </div>
                                         <h3 id="registeredServiceWebflowInterruptPolicy" class="advanced-option">Webflow Interrupt Policy</h3>
                                          <div id="editServiceWizardMenuItemWebflowInterruptPolicy">

                                                <script type="text/javascript">
                                                       createSelectField({
                                                           containerId: "editServiceWizardMenuItemWebflowInterruptPolicy",
                                                           labelTitle: "Force Execution:",
                                                           paramName: "webflowInterruptPolicy.forceExecution",
                                                           paramType: "org.apereo.cas.services.DefaultRegisteredServiceWebflowInterruptPolicy",
                                                           options: [
                                                               {value: "", text: "UNDEFINED", selected: true},
                                                               {value: "TRUE", text: "TRUE"},
                                                               {value: "FALSE", text: "FALSE"}
                                                           ],
                                                           helpText: "Specifies whether to force execution of the webflow interrupt policy."
                                                       });
                                                </script>
                                                <div th:replace="~{fragments/switchbutton :: switchbutton (id='aupEnabled',
                                                    title='When enabled, the acceptable usage policy is enforced for this service',
                                                    label='#Enabled', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=webflowInterruptPolicy.enabled,param-type=org.apereo.cas.services.DefaultRegisteredServiceWebflowInterruptPolicy')}"/>

                                          </div>

                                        <h3 id="registeredServicePasswordlessPolicy" class="advanced-option">Passwordless Policy</h3>
                                          <div id="editServiceWizardMenuItemPasswordlessPolicy">
                                                 <div th:replace="~{fragments/switchbutton :: switchbutton (id='passwordlessEnabled',
                                                    title='When enabled, passwordless authentication is enforced for this service',
                                                    label='#Enabled', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=passwordlessPolicy.enabled,param-type=org.apereo.cas.services.DefaultRegisteredServicePasswordlessPolicy')}"/>

                                          </div>
                                        <h3 id="registeredServiceSurrogatePolicy" class="advanced-option">Surrogate (Impersonation) Policy</h3>
                                          <div id="editServiceWizardMenuItemSurrogatePolicy">
                                                  <div th:replace="~{fragments/switchbutton :: switchbutton (id='surrogateEnabled',
                                                    title='When enabled, surrogate authentication is enforced for this service',
                                                    label='#Enabled', cssClass='pt-2',
                                                    dataAttrs='param-skip-false=true,param-name=surrogatePolicy.enabled,param-type=org.apereo.cas.services.DefaultRegisteredServiceSurrogatePolicy')}"/>
                                          </div>
                                    </div>
                                    <section class="my-3 h-350px">
                                        <pre class="ace-editor ace-relative w-100 h-100 mb-0" id="wizardServiceEditor"></pre>

                                        <span class="pl-4"><sub><span class="mdi mdi-information-box-outline"></span>
                                            The editor above shows the current state of the service definition as it is being built using the wizard.
                                            While the chosen format is JSON, the actual format of the entry used when saving may differ based on your registry configuration.
                                            This is merely a preview of the service definition being constructed and cannot be edited directly.
                                        </sub></span>
                                    </section>
                                </form>
                            </div>

                            <footer class="mdc-dialog__actions modal-footer pr-4">
                                <button id="copyServiceDefinitionWizard" name="copyServiceDefinitionWizard" type="button"
                                        class="mdc-button mdc-button--raised btn mdc-button--lg">
                                    <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-content-copy"
                                                                       aria-hidden="true"></i>Copy</span>
                                </button>
                                <button id="validateServiceWizard" name="validateServiceWizard" type="button"
                                        class="mdc-button mdc-button--raised btn mdc-button--lg">
                                    <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-check-all"
                                                                       aria-hidden="true"></i>Validate</span>
                                </button>
                                <button id="saveServiceWizard" name="saveServiceWizard" type="button"
                                        class="mdc-button mdc-button--raised btn mdc-button--lg">
                                    <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-content-save"
                                                                       aria-hidden="true"></i>Save</span>
                                </button>
                            </footer>
                        </div>
                    </div>
                    <div class="mdc-dialog__scrim"></div>
                </div>
                
                <div class="mdc-dialog modal" id="editServiceDialog" role="alertdialog"
                     aria-modal="true" aria-labelledby="edit-service-dialog-title" aria-describedby="dialog-content">
                    <div class="mdc-dialog__container w-100 modal-dialog">
                        <div class="mdc-dialog__surface mw-100 w-75 modal-content min-height-60">
                            <div class="mdc-dialog__content modal-body" id="edit-service-dialog-content">

                                <section class="d-flex h-750px" id="serviceEditorContainer">
                                    <div id="serviceTemplatesContainer" class="w-25 py-3 mr-2 jqueryui-accordion">

                                    </div>
                                    <pre class="ace-editor ace-relative w-100 h-100" id="serviceEditor"></pre>
                                </section>
                            </div>

                            <footer class="mdc-dialog__actions modal-footer pr-4">
                                <button id="saveService" name="saveService" type="button"
                                        class="mdc-button mdc-button--raised btn mdc-button--lg">
                                    <span class="mdc-button__label"><i class="mdc-tab__icon mdi mdi-content-save"
                                                                       aria-hidden="true"></i>Save</span>
                                </button>
                            </footer>
                        </div>
                    </div>
                    <div class="mdc-dialog__scrim"></div>
                </div>

                <div class="mdc-dialog modal" id="viewEntityHistoryDialog" role="alertdialog"
                     aria-modal="true" aria-labelledby="view-entity-history-title" aria-describedby="dialog-content">
                    <div class="mdc-dialog__container w-100 modal-dialog">
                        <div class="mdc-dialog__surface mw-100 w-75 modal-content min-height-60">
                            <div class="mdc-dialog__content modal-body" id="view-entity-history-content">
                                <h3>History</h3>
                                <table id="entityHistoryTable"
                                       class="mdc-data-table__table table table-striped noborder">
                                    <thead>
                                    <tr class="mdc-data-table__header-row">
                                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col">ID</th>
                                        <th class="mdc-data-table__header-cell" role="columnheader"
                                            scope="col">Date</th>
                                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col"></th>
                                    </tr>
                                    </thead>
                                    <tbody class="mdc-data-table__content">
                                    </tbody>
                                </table>

                                <section class="d-flex h-450px">
                                    <pre class="ace-editor ace-relative w-100 h-100" id="entityHistoryEditor"></pre>
                                </section>
                            </div>
                        </div>
                    </div>
                    <div class="mdc-dialog__scrim"></div>
                </div>

                <div class="mdc-dialog modal" id="viewEntityChangelogDialog" role="alertdialog"
                     aria-modal="true" aria-labelledby="view-entity-changelog-title" aria-describedby="dialog-content">
                    <div class="mdc-dialog__container w-100 modal-dialog">
                        <div class="mdc-dialog__surface mw-100 w-75 modal-content min-height-60">
                            <div class="mdc-dialog__content modal-body" id="view-entity-changelog-content">
                                <h3>Changelog</h3>
                                <p>The following changes are recorded for this service definition:</p>
                                <section class="d-flex h-750px">
                                    <pre class="ace-editor ace-relative w-100 h-100" id="entityChangelogEditor"></pre>
                                </section>
                            </div>
                        </div>
                    </div>
                    <div class="mdc-dialog__scrim"></div>
                </div>

            </div>


            <div id="saml2metadataproviders-tab">
                <table id="saml2MetadataProvidersTable" class="mdc-data-table__table table table-striped noborder">
                    <thead>
                    <tr class="mdc-data-table__header-row">
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col">ID</th>
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col">Service</th>
                        <th class="mdc-data-table__header-cell" role="columnheader" scope="col">URL</th>
                    </tr>
                    </thead>
                    <tbody class="mdc-data-table__content">
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    </span>
</body>
</html>
